package Thread;

public class ThreadDemo9 {
    public static void main(String[] args) {
        Thread thread = new Thread(()->{
            while(true) {
                System.out.println("hello");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        thread.start();
        //第二次使用start
        //对于一个Thread对象来说，start只能调用一次
        thread.start();
    }
}
